package com.midian.action.mc.sys;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.midian.action.mc.common.AjaxAction;
import com.midian.common.annotation.FunctionAnnotationOverride;
import com.midian.model.sys.ValidateCode;
import com.midian.service.sys.IValidateCodeService;

/**
 * 验证码Action
 * @author Mengfh
 *
 */
@Scope("prototype")
@Controller("validateCodeAction")
@FunctionAnnotationOverride(isAction = true, auth = "验证码管理")
public class ValidateCodeAction extends AjaxAction<ValidateCode> {
	/**验证码实体*/
	private ValidateCode entity;
	/**验证码实体列表*/
	private List<ValidateCode> rows;
	/**验证码业务*/
	private IValidateCodeService validateCodeService;
	
	public ValidateCode getEntity() {
		return entity;
	}
	public void setEntity(ValidateCode entity) {
		this.entity = entity;
	}
	@Resource(name = "validateCodeService")
	public void setValidateCodeService(IValidateCodeService validateCodeService) {
		this.service = validateCodeService;
		this.validateCodeService = validateCodeService;
	}
	@Override
	protected ValidateCode dytEntity() {
		if(this.entity == null) {
			this.entity = new ValidateCode();
		}
		return getEntity();
	}
	@Override
	protected void dyEntity(ValidateCode t) {
		setEntity(t);
	}
	@Override
	public void setRows(List<ValidateCode> rows) {
		this.rows = rows;
	}
	@Override
	public List<ValidateCode> getRows() {
		return rows;
	}
}
